<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        img{
            position: absolute;
        }
    </style>
</head>
<body>
    <img src="images/angel.gif" alt="天使">
</body>
<script>
    var img = document.querySelector('img')
    document.addEventListener('mousemove',function(){
        var event = event || window.event
        console.log(event.pageX, event.pageY);
        img.style.left = event.pageX -40 + 'px'  // '100px'
        img.style.top = event.pageY -34 + 'px' // '200px'
    })
</script>
</html>